package c.a.a.z.b;

import android.graphics.Path;
import android.graphics.PointF;
import c.a.a.b0.e;
import c.a.a.b0.k.q;
import c.a.a.f0.c;
import c.a.a.l;
import c.a.a.z.c.a;
import c.a.a.z.c.a.b;
import java.util.List;

/* compiled from: EllipseContent */
public class f implements m, b, k {
    public final Path a = new Path();
    public final String b;
    public final l c;
    public final a<?, PointF> d;
    public final a<?, PointF> e;
    public final c.a.a.b0.k.a f;
    public b g = new b();
    public boolean h;

    public f(l lVar, c.a.a.b0.l.b bVar, c.a.a.b0.k.a aVar) {
        this.b = aVar.a;
        this.c = lVar;
        a a = aVar.c.a();
        this.d = a;
        a a2 = aVar.b.a();
        this.e = a2;
        this.f = aVar;
        bVar.e(a);
        bVar.e(a2);
        a.a.add(this);
        a2.a.add(this);
    }

    public String a() {
        return this.b;
    }

    public void c() {
        this.h = false;
        this.c.invalidateSelf();
    }

    public void d(List<c> list, List<c> list2) {
        for (int i = 0; i < list.size(); i++) {
            c cVar = (c) list.get(i);
            if (cVar instanceof s) {
                s sVar = (s) cVar;
                if (sVar.c == q.a.SIMULTANEOUSLY) {
                    this.g.a.add(sVar);
                    sVar.b.add(this);
                }
            }
        }
    }

    public void f(e eVar, int i, List<e> list, e eVar2) {
        c.a.a.e0.f.f(eVar, i, list, eVar2, this);
    }

    public Path h() {
        if (this.h) {
            return this.a;
        }
        this.a.reset();
        if (this.f.e) {
            this.h = true;
            return this.a;
        }
        PointF pointF = (PointF) this.d.e();
        float f = pointF.x / 2.0f;
        float f2 = pointF.y / 2.0f;
        float f3 = f * 0.55228f;
        float f4 = 0.55228f * f2;
        this.a.reset();
        float f5;
        if (this.f.d) {
            float f6 = -f2;
            this.a.moveTo(0.0f, f6);
            float f7 = 0.0f - f3;
            float f8 = -f;
            float f9 = 0.0f - f4;
            this.a.cubicTo(f7, f6, f8, f9, f8, 0.0f);
            f4 += 0.0f;
            f5 = f6;
            this.a.cubicTo(f8, f4, f7, f2, 0.0f, f2);
            f3 += 0.0f;
            this.a.cubicTo(f3, f2, f, f4, f, 0.0f);
            this.a.cubicTo(f, f9, f3, f5, 0.0f, f5);
        } else {
            float f10 = -f2;
            this.a.moveTo(0.0f, f10);
            f5 = f3 + 0.0f;
            float f11 = 0.0f - f4;
            this.a.cubicTo(f5, f10, f, f11, f, 0.0f);
            f4 += 0.0f;
            this.a.cubicTo(f, f4, f5, f2, 0.0f, f2);
            float f12 = 0.0f - f3;
            f = -f;
            this.a.cubicTo(f12, f2, f, f4, f, 0.0f);
            f2 = f10;
            this.a.cubicTo(f, f11, f12, f2, 0.0f, f2);
        }
        pointF = (PointF) this.e.e();
        this.a.offset(pointF.x, pointF.y);
        this.a.close();
        this.g.a(this.a);
        this.h = true;
        return this.a;
    }

    public <T> void i(T t, c<T> cVar) {
        a aVar;
        c cVar2;
        if (t == c.a.a.q.g) {
            aVar = this.d;
            cVar2 = aVar.e;
            aVar.e = cVar;
        } else if (t == c.a.a.q.j) {
            aVar = this.e;
            cVar2 = aVar.e;
            aVar.e = cVar;
        }
    }
}
